<?php
if(!defined('IN_IBEIKE')) {
	exit('Access Denied');
}

class table_log_login extends common_table
{
	public function __construct() {

		$this->_table = 'log_login';
		$this->_pk    = 'lid';

		parent::__construct();
	}
	public function fetch_all_by_lid($lid){
		if(!empty($lid)&&$lid){
			return DB::fetch_all('SELECT * FROM %t WHERE lid=%s',array($this->_table,$lid));//返回数组包含各个字段的值
		}
		return false;
	}
	public function insert($data,$return_insert_id=false,$replace=false,$silent=false){
		if($data && is_array($data)){
			return DB::insert($this->_table, $data, true);
		}
		return false;
	}
	public function insert_new($uid,$decr=""){
		if(!empty($uid)){
			$data=array();
		    $data['lid']="";//暂时未知
		    $data['type']="";//暂时未知
		    $data['dateline']=time();
		    $data['uid']=$uid;
		    $data['descr']=$decr;
		    return DB::insert($this->_table,$data,true);
		}else{
			return false;
		}
		
	}

	
}
?>